mathematics of finance calculations